package cn.gson.oasys.controller;

import cn.gson.oasys.pojo.AoaMailnumber;
import cn.gson.oasys.service.AoaMailnumberService;
import cn.gson.oasys.service.AoaUserService;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;

/**
 * Created by zhangyu on 2020/11/30.
 */
@Controller
public class AoamailnumberController {
    @Resource
    private AoaMailnumberService aoaMailnumberService;
    @Resource
    private AoaUserService aoaUserService;

    @RequestMapping("getAllAoaMailnumber")
    @ResponseBody
    //邮件管理-->账号管理主页面--zy 1 111
    public Object getAllAoaMailnumber() {
        return aoaMailnumberService.getAllAoaMailnumber();
    }
    @RequestMapping("getaoaMailnumber")
    @ResponseBody
    //邮件管理-->根据账号名查询--zy
    public Object getaoaMailnumber(String mailUserName) {;
        return aoaMailnumberService.getaoaMailnumber(mailUserName);
    }
    @RequestMapping("insertAoaMailnumbe")
    @ResponseBody
    //邮件管理 账号管理 新增--zy
    public Object insertAoaMailnumber(AoaMailnumber aoaMailnumber){
        return  aoaMailnumberService.insertAoaMailnumber(aoaMailnumber);
    }
    @RequestMapping("deleteAoaMailnumber")
    @ResponseBody
    //邮件管理 账号管理 删除--zy
    public Object eletAoaMailnumber(int mailNumUserId) {
        return aoaMailnumberService.deletAoaMailnumber(mailNumUserId);
    }
    @RequestMapping("updateAoaMailnumber")
    @ResponseBody
    //邮件管理 账号管理 修改--zy
    public Object updateAoaMailnumber(AoaMailnumber aoaMailnumber) {
        return aoaMailnumberService.updateAoaMailnumber(aoaMailnumber);
    }


}
